package com.pt.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
@ApiModel(value = "注册请求参数", description = "用户注册时需要提供的信息")
public class RegisterRequest {
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 20, message = "用户名长度必须在3-20之间")
    @ApiModelProperty(value = "用户名", required = true, example = "testuser")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20之间")
    @ApiModelProperty(value = "密码", required = true, example = "password123")
    private String password;

    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(value = "邮箱", required = true, example = "user@example.com")
    private String email;

    @NotBlank(message = "邀请码不能为空")
    @ApiModelProperty(value = "邀请码", required = true, example = "ABC123XYZ")
    private String invitationCode;

    // 前端确认密码字段，后端不进行处理，只是为了避免JSON解析错误
    @ApiModelProperty(value = "确认密码", hidden = true)
    private String confirmPassword;
} 